<?php

$uploadAIDS = new UploadAids();
class UploadAids {

	var $upload_aids;
	var $uindex;
	
	function __construct()
	{
		$this->upload_aids = array();
		$this->uindex = 0;
	}

	function UploadAids()
	{
		$this->__construct();
	}

	//上传附件时记录数据库本次的插入记录
	function SaveUploadAids($up_aids)
	{
		setcookie ("uaids[".$up_aids."]", $up_aids, 0);
	}
	
	function FetchUploadAids()
	{
		$this->uindex = 0;
		$tmp_aid = "";
		$tmp_aids = array();
		
		if (isset($_COOKIE["uaids"]))
		{
			foreach ($_COOKIE["uaids"] as $name => $value)
			{
				if ($value <> '')
					$tmp_aids[] = $value;
				setcookie ("uaids[".$name."]");
			}
			$tmp_aid = implode (",", $tmp_aids);
		}
		return $tmp_aid;
	}
}
?>